platform :ios, '13.0'
workspace 'BlueWallet'
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

target 'BlueWallet' do
  config = use_native_modules!

  use_react_native!(
    :path => config[:reactNativePath],
    # to enable hermes on iOS, change `false` to `true` and then install pods
    :hermes_enabled => false
  )

  # Enables Flipper.
  #
  # Note that if you have use_frameworks! enabled, Flipper will not work and
  # you should disable these next few lines.
  use_flipper!()
  post_install do |installer|
      react_native_post_install(installer)
      pod 'Bugsnag'
      plugin 'cocoapods-bugsnag'
      installer.pods_project.targets.each do |target|
          target.build_configurations.each do |config|
            config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
            if ['React-Core-AccessibilityResources'].include? target.name 
              config.build_settings['CODE_SIGN_STYLE'] = "Manual"
              config.build_settings['CODE_SIGN_IDENTITY'] = "Apple Distribution: Bluewallet Services, S. R. L. (A7W54YZ4WU)"
              config.build_settings['DEVELOPMENT_TEAM'] = "A7W54YZ4WU"
            end
          end
      end
  end

  
end

target 'WidgetsExtension' do
  pod 'SwiftSocket', :git => 'https://github.com/swiftsocket/SwiftSocket.git', :branch => 'master'
end
